//
//  Common.swift
//  SinaWeibo
//
//  Created by zhuangqianwei on 16/11/15.
//  Copyright © 2016年 zhuangqianwei. All rights reserved.
//

import UIKit


//第三方登录授权配置信息
let client_id = "3638402557"
let client_secret = "1086a42595a276596004ecd78b207bbe"
let redirect_uri = "http://www.baidu.com"
//定义切换根视图控制器的通知名称
let kChoseRootViewController = "kChoseRootViewController"


//定义随即色
func randomColor() -> UIColor {
    
    let r = CGFloat(arc4random() % 256) / 255.0
    let g = CGFloat(arc4random() % 256) / 255.0
    let b = CGFloat(arc4random() % 256) / 255.0
    
    return UIColor(red: r, green: g, blue: b, alpha: 1)
    
}

//记录屏幕尺寸的信息

let ScreenWidth = UIScreen.main.bounds.width

let ScreenHeight = UIScreen.main.bounds.height

let navBarHeight: CGFloat = 64
//定义全局的格式化对象
let sharedDateFormater = DateFormatter()

let atSomeRegex = try! NSRegularExpression(pattern: "@\\w+", options: [])
let topicRegex = try! NSRegularExpression(pattern: "#.*?#", options: [])
let urlRegex = try! NSRegularExpression(pattern: "(http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&amp;:/~\\+#]*[\\w\\-\\@?^=%&amp;/~\\+#])?", options: [])
let emoticonRegex = try! NSRegularExpression(pattern: "\\[.*?\\]", options: [])
